import axios from '@/libs/axios1'
let jsonHeaders = { 'content-type': 'application/json;charset=UTF-8' }

// 上报主观题
export const reportedTargets = data => {
    return axios({
        url: `/resource-manager/send/report/target/send`,
        method: 'post',
        headers: jsonHeaders,
        data
    })
}

// 上报主观题
export const reportedQuestions = data => {
    return axios({
        url: `/resource-manager/send/report/subject/send`,
        method: 'post',
        headers: jsonHeaders,
        data
    })
}

// 上报镜像
export const reportedImages = ids => {
    return axios({
        url: `/resource-manager/send/report/image/send`,
        method: 'post',
        headers: jsonHeaders,
        data: ids
    })
}

// 上报配额
export const reportedFlavors = ids => {
    return axios({
        url: `/resource-manager/send/report/flavor/send`,
        method: 'post',
        headers: jsonHeaders,
        data: ids
    })
}

// 上报人员
export const reportedUsers = ids => {
    return axios({
        url: `/identity/escalation/user`,
        method: 'post',
        headers: jsonHeaders,
        data: ids
    })
}

// 上报实验组
export const reportedGroups = ids => {
    return axios({
        url: `/identity/escalation/group`,
        method: 'post',
        headers: jsonHeaders,
        data: ids
    })
}

// 上报图标
export const reportedIcons = ids => {
    return axios({
        url: `/resource-manager/send/report/icon/send`,
        method: 'post',
        headers: jsonHeaders,
        data: ids
    })
}

// 上报设备
export const reportedDevices = ids => {
    return axios({
        url: `/resource-manager/send/report/device/send`,
        method: 'post',
        headers: jsonHeaders,
        data: ids
    })
}

// 上报模板
export const reportedTemplate = ids => {
    return axios({
        url: `/resource-manager/send/report/template/send`,
        method: 'post',
        headers: jsonHeaders,
        data: ids
    })
}

//查询所有分靶场
export const getRangeAll = params => {
    
    return axios({
      url: `/range-manager/unsafe/range`,
      method: "get",
      params: params,
      headers: jsonHeaders
    });
  };

// 查询上报资源的上报状态
export const getReportedStatus = ids => {
    return axios({
        url: `/new-paper/send/report/list/send`,
        method: 'post',
        headers: jsonHeaders,
        data: {
            id: ids
        }
    })
}

//查询 用户和用户组上报的状态
export const getUserGroupStatus = ids => {
    return axios({
        url: `/identity/escalation/result`,
        method: 'post',
        headers: jsonHeaders,
        data:ids
    })
}